#ifndef __KERNEL_MEMORY_H__
#define __KERNEL_MEMORY_H__

#include "stdint.h"
#include "bitmap.h"

enum pool_flags
{
	PF_KERNEL = 1,
	PF_USER = 2
};

#define	 PG_P_1	  1
#define	 PG_P_0	  0
#define	 PG_RW_R  0
#define	 PG_RW_W  2
#define	 PG_US_S  0
#define	 PG_US_U  4

struct virtual_pool
{
	struct bitmap addr_pool;
	void* vaddr_start;
};

struct mem_pool
{
	struct bitmap addr_pool;
	void* paddr_start;
	uint32_t size;
};

void memory_init(void);
void* malloc_page(enum pool_flags pf, uint32_t pg_count);

#endif
